package org.example.springmvc.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * ClassName: Hello01Controller
 * Package: org.example.springmvc.controller
 * Description:
 *
 * @Author wanghao
 * @Create 2024-07-11 8:29
 * @Version 1.0
 */
// 在类上添加@RequestMapping注解
@Controller
@RequestMapping("/hello02")
public class Hello02Controller {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @RequestMapping("/a")
    public String h01() {
        logger.info("hello02-h01方法执行了");
        return "succ";
    }

    @RequestMapping("/b")
    public String h02() {
        logger.info("hello2-h02方法执行了");
        return "succ";
    }
}
